/**
 * 
 */
package rebol.eclipse.plugin.helpers;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author volker
 * 
 */
public class Config {

	public static File scriptDir =  new File("rebol/eclipse/plugin/rebol-scripts");
	static File exes = new File(scriptDir,"rebol-exes.txt");
	
	public static String rebolBase() {
		return readExeLine(0);
	}

	public static String rebolCallBase() {
		return readExeLine(1);
	}

	private static String readExeLine(int line) {
		try {
			BufferedReader br = new BufferedReader(new FileReader(exes));
			for (int i = 0; i < line; i++) {
				br.readLine();
			}
			return br.readLine();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}
}
